#!/usr/bin/env python

import sys

with open(sys.argv[1], 'w') as f:
    for line in sys.stdin:
        if line.startswith('---'):
            if 'INFO:' in line:
                sys.stdout.write(line)
            else:
                sys.stderr.write(line)
        else:
            f.write(line)
